<template>
  <div class="nav">
    <input type="text" v-model="title" />
    <el-button @click="add">add</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: "",
    };
  },
  mounted() {},
  methods: {
    add() {
      this.$store.commit("add", this.title);
    },
  },
  components: {},
};
</script>

<style lang="scss" scoped>
.nav {
  width: 800px;
  margin: 50px auto;
  //   background: #ccc;

  input {
    width: 300px;
    height: 30px;
  }
}
</style>
